package com.hotline.communication.service.impl;

import com.hotline.communication.mapper.OrgMapper;
import com.hotline.communication.dto.OrgDTO;
import com.hotline.communication.service.OrgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class OrgServiceImpl implements OrgService {

    @Resource
    private OrgMapper orgMapper;


    @Override
    public OrgDTO selectById(String orgId) {
        log.debug("ACCESS_LOG[]org[]机构管理[]根据机构ID取机构信息[]{}",orgId);
        OrgDTO orgDTO = orgMapper.selectById(orgId);
        return orgDTO;
    }

    @Override
    public List<OrgDTO> selectByParentId(String parentId) {
        return orgMapper.selectByParentId(parentId);
    }
}
